#include<iostream>
#include<cmath>
using namespace std;
int main()
{
	int t = 0;
	cin >> t;
	while (t--) {
		int n;
		cin >> n;
		double sum = 0;
		for (double i = 1; i <= n; i++) {
			sum += log10(i);
		}
		cout << (int)(sum+1) << endl;
	}
	return 0;
}